/**
  CNOK project, Anyang Normal University, IMP-CAS
  \class TANucleus
  \brief Info on a nucleus, but currently concentrated on 1N removal info, i.e.
  separation energies, energy levels, and c2s.
  \author SUN Yazhou, asia.rabbit@163.com
  \since 2022/05/25
  \date Last modified: 2023/02/04 by SUN Yazhou
  \copyright 2020-2023 SUN Yazhou
  \copyright CNOK project, Anyang Normal University, IMP-CAS
*/

#ifndef _TANucleus_h_
#define _TANucleus_h_

#include <vector>
#include <string>
#include <initializer_list>

using std::vector;
using std::string;
using std::initializer_list;

class TANucleus{
public:
  TANucleus(const string &f); ///< \param f: yaml config file
  /// \param sp: true: proton knockout; false: neutron knockout
  TANucleus(int a, double sp, double sn, double cs, double dcs);
  virtual ~TANucleus(){}

  void SetBaseDir(const string &dir){ fBaseDir = dir; } ///< path to the yaml files
  void SetOrbit(const initializer_list<const char *> &l); ///< set the valence configurations
  void SetEx(const initializer_list<double> &l); ///< set the excitation energies
  void SetC2S(const initializer_list<double> &l); ///< set the spectroscopic factors
  void SetCS(const initializer_list<double> &l); ///< use external calculated cs

  const string &GetBaseDir() const{ return fBaseDir; }
  double GetExpCS() const{ return fCSExp; }
  double GetDExpCS() const{ return fDCSExp; }
  const string &GetOrbit(int i) const;
  double GetEx(int i) const;
  double GetC2S(int i) const;
  double GetA() const{ return fA; }

  void Rs(); ///< calcualte Rs
  void SetEk(double ek);
  void SetPauli(bool pauli);
  void SetFNNParOpt(int opt);

protected:
  string fBaseDir; ///< = e.g., "/home/asia/Lab/cnok/cnok/config/O/O22";
  double fA, fSp, fSn;
  bool fIsP; ///< true: proton knockout; false: neutron knockout
  double fCSExp, fDCSExp;
  vector<string> fOrbit; ///< = e.g., {"0p1/2_1/2-", "0p3/2_3/2-", "0d5/2_5/2+"};
  vector<double> fEx; ///< = e.g., {0., 1.160, 2.380};
  vector<double> fC2S; ///< = e.g., {1.6315, 0.8734, 0.0213};
  // for usage of external c.s. rather than calculated by momd itself
  vector<double> fCS; ///< sigma_str + sigma_diff

  /// for overwriting yaml - only set if necessary
  double fEk;
  int fPauli;
  int fFNNParOpt;
};

#endif
